/*获取cookie*/
export function getCookie(c_name) {
    let strCookie=document.cookie;
    let arrCookie=strCookie.split("; ");
    let userId;
    for(var i=0;i<arrCookie.length;i++){
        var arr=arrCookie[i].split("=");
        //找到名称为userId的cookie，并返回它的值
        if(c_name==arr[0]){
        userId=arr[1];
        break;
        }
    }
    return userId
}
// 将cookie值设置为过期
export function delCookie(name){
    var date=new Date();
    date.setTime(date.getTime()-10000);
    document.cookie=name+"=n;expire="+date.toGMTString();
}